package com.eso.haBank.taglib

import com.eso.haBank.domain.Customization
import com.eso.frame.cache.ICache
import com.eso.project.AppGlobal

/**
 * 系统全局标签
 * User: Noah.Rong
 * Version: 0.1,  2012-07-28 09:38
 */
class AppTagLib {

    static namespace = "app"

    ICache appGlobalCache;

    /**
     * 应用名称
     */
    def appName = {attrs, body ->
        def appCustomizeInstance = (Customization) appGlobalCache.get(AppGlobal.CUSTOMIZE.PROJECT);
        out << appCustomizeInstance.customizeValue;
    }

    /**
     * 系统LOGO
     */
    def appLogo = {attrs, body ->
        def appCustomizeInstance = (Customization) appGlobalCache.get(AppGlobal.CUSTOMIZE.LOGO);
        out << appCustomizeInstance.customizeValue;
    }

    /**
     * 应用版本号
     */
    def appVersion = {attrs, body ->
        def appCustomizeInstance = (Customization) appGlobalCache.get(AppGlobal.CUSTOMIZE.VERSION);
        out << appCustomizeInstance.customizeValue;
    }
}
